com.supermap.ar.areffect
Class OrientationListener
- java.lang.Object
-
- com.supermap.ar.areffect.OrientationListener
-
- All Implemented Interfaces:
- android.hardware.SensorEventListener
public class OrientationListener extends java.lang.Object implements android.hardware.SensorEventListener
Orientation listener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
OrientationListener.OnOrientationListener
Listener interface class
-
Constructor Summary
Constructors Constructor and Description OrientationListener(android.content.Context context)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
onAccuracyChanged(android.hardware.Sensor sensor, int accuracy)
void
onSensorChanged(android.hardware.SensorEvent event)
void
registerListener()
Registers acceleration and geomagnetic field sensor listener Calls in onResumevoid
setOnOrientationListener(OrientationListener.OnOrientationListener onOrientationListener)
Sets the listenervoid
unregisterListener()
Deleting listener Calls on onPause
-
-
-
Constructor Detail
-
OrientationListener
public OrientationListener(android.content.Context context)
The constructor.- Parameters:
context
-
-
-
Method Detail
-
setOnOrientationListener
public void setOnOrientationListener(OrientationListener.OnOrientationListener onOrientationListener)
Sets the listener- Parameters:
onOrientationListener
-
-
registerListener
public void registerListener()
Registers acceleration and geomagnetic field sensor listener Calls in onResume
-
unregisterListener
public void unregisterListener()
Deleting listener Calls on onPause
-
onSensorChanged
public void onSensorChanged(android.hardware.SensorEvent event)
- Specified by:
onSensorChanged
in interfaceandroid.hardware.SensorEventListener
-
onAccuracyChanged
public void onAccuracyChanged(android.hardware.Sensor sensor, int accuracy)
- Specified by:
onAccuracyChanged
in interfaceandroid.hardware.SensorEventListener
-
-